<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Module: Spec::Story::World</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Module</strong></td>
          <td class="class-name-in-header">Spec::Story::World</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../files/vendor/plugins/rspec/lib/spec/story/world_rb.html">
                vendor/plugins/rspec/lib/spec/story/world.rb
                </a>
        <br />
            </td>
        </tr>

        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000127">And</a>&nbsp;&nbsp;
      <a href="#M000124">Given</a>&nbsp;&nbsp;
      <a href="#M000123">GivenScenario</a>&nbsp;&nbsp;
      <a href="#M000126">Then</a>&nbsp;&nbsp;
      <a href="#M000125">When</a>&nbsp;&nbsp;
      <a href="#M000113">add_listener</a>&nbsp;&nbsp;
      <a href="#M000111">create</a>&nbsp;&nbsp;
      <a href="#M000120">dry_run</a>&nbsp;&nbsp;
      <a href="#M000122">errors</a>&nbsp;&nbsp;
      <a href="#M000119">errors</a>&nbsp;&nbsp;
      <a href="#M000112">listeners</a>&nbsp;&nbsp;
      <a href="#M000117">run_given_scenario_with_suspended_listeners</a>&nbsp;&nbsp;
      <a href="#M000121">start_collecting_errors</a>&nbsp;&nbsp;
      <a href="#M000114">step_mother</a>&nbsp;&nbsp;
      <a href="#M000116">step_names</a>&nbsp;&nbsp;
      <a href="#M000118">store_and_call</a>&nbsp;&nbsp;
      <a href="#M000115">use</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->
    <div id="includes">
      <h3 class="section-bar">Included Modules</h3>

      <div id="includes-list">
        <span class="include-name"><a href="../Example/Pending.html">::Spec::Example::Pending</a></span>
        <span class="include-name"><a href="../Matchers.html">::Spec::Matchers</a></span>
      </div>
    </div>

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000113" class="method-detail">
        <a name="M000113"></a>

        <div class="method-heading">
          <a href="#M000113" class="method-signature">
          <span class="method-name">add_listener</span><span class="method-args">(listener)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000113-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000113-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/world.rb, line 30</span>
30:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_listener</span>(<span class="ruby-identifier">listener</span>)
31:           <span class="ruby-identifier">listeners</span>() <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">listener</span>
32:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000111" class="method-detail">
        <a name="M000111"></a>

        <div class="method-heading">
          <a href="#M000111" class="method-signature">
          <span class="method-name">create</span><span class="method-args">(cls = Object, *args)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000111-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000111-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/world.rb, line 22</span>
22:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create</span>(<span class="ruby-identifier">cls</span> = <span class="ruby-constant">Object</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
23:           <span class="ruby-identifier">cls</span>.<span class="ruby-identifier">new</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>).<span class="ruby-identifier">extend</span>(<span class="ruby-constant">World</span>)
24:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000120" class="method-detail">
        <a name="M000120"></a>

        <div class="method-heading">
          <a href="#M000120" class="method-signature">
          <span class="method-name">dry_run</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000120-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000120-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/world.rb, line 90</span>
90:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dry_run</span>
91:           <span class="ruby-operator">::</span><span class="ruby-constant">Spec</span><span class="ruby-operator">::</span><span class="ruby-constant">Story</span><span class="ruby-operator">::</span><span class="ruby-constant">Runner</span>.<span class="ruby-identifier">dry_run</span>
92:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000119" class="method-detail">
        <a name="M000119"></a>

        <div class="method-heading">
          <a href="#M000119" class="method-signature">
          <span class="method-name">errors</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000119-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000119-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/world.rb, line 86</span>
86:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">errors</span>
87:           <span class="ruby-ivar">@errors</span> <span class="ruby-operator">||=</span> []
88:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000112" class="method-detail">
        <a name="M000112"></a>

        <div class="method-heading">
          <a href="#M000112" class="method-signature">
          <span class="method-name">listeners</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000112-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000112-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/world.rb, line 26</span>
26:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">listeners</span>
27:           <span class="ruby-ivar">@listeners</span> <span class="ruby-operator">||=</span> []
28:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000117" class="method-detail">
        <a name="M000117"></a>

        <div class="method-heading">
          <a href="#M000117" class="method-signature">
          <span class="method-name">run_given_scenario_with_suspended_listeners</span><span class="method-args">(world, type, name, scenario)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000117-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000117-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/world.rb, line 46</span>
46:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run_given_scenario_with_suspended_listeners</span>(<span class="ruby-identifier">world</span>, <span class="ruby-identifier">type</span>, <span class="ruby-identifier">name</span>, <span class="ruby-identifier">scenario</span>)
47:           <span class="ruby-identifier">current_listeners</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">listeners</span>)
48:           <span class="ruby-keyword kw">begin</span>
49:             <span class="ruby-identifier">listeners</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">found_scenario</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">name</span>) }
50:             <span class="ruby-ivar">@listeners</span>.<span class="ruby-identifier">clear</span>
51:             <span class="ruby-identifier">scenario</span>.<span class="ruby-identifier">perform</span>(<span class="ruby-identifier">world</span>, <span class="ruby-identifier">name</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">dry_run</span>
52:           <span class="ruby-keyword kw">ensure</span>
53:             <span class="ruby-ivar">@listeners</span>.<span class="ruby-identifier">replace</span>(<span class="ruby-identifier">current_listeners</span>)
54:           <span class="ruby-keyword kw">end</span>
55:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000114" class="method-detail">
        <a name="M000114"></a>

        <div class="method-heading">
          <a href="#M000114" class="method-signature">
          <span class="method-name">step_mother</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000114-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000114-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/world.rb, line 34</span>
34:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">step_mother</span>
35:           <span class="ruby-ivar">@step_mother</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">StepMother</span>.<span class="ruby-identifier">new</span>
36:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000116" class="method-detail">
        <a name="M000116"></a>

        <div class="method-heading">
          <a href="#M000116" class="method-signature">
          <span class="method-name">step_names</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000116-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000116-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/world.rb, line 42</span>
42:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">step_names</span>
43:           <span class="ruby-ivar">@step_names</span> <span class="ruby-operator">||=</span> []
44:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000118" class="method-detail">
        <a name="M000118"></a>

        <div class="method-heading">
          <a href="#M000118" class="method-signature">
          <span class="method-name">store_and_call</span><span class="method-args">(world, type, name, *args, &amp;block)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000118-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000118-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/world.rb, line 57</span>
57:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store_and_call</span>(<span class="ruby-identifier">world</span>, <span class="ruby-identifier">type</span>, <span class="ruby-identifier">name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
58:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
59:             <span class="ruby-identifier">step_mother</span>.<span class="ruby-identifier">store</span>(<span class="ruby-identifier">type</span>, <span class="ruby-constant">Step</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>))
60:           <span class="ruby-keyword kw">end</span>
61:           <span class="ruby-identifier">step</span> = <span class="ruby-identifier">step_mother</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">name</span>)
62: 
63:           <span class="ruby-identifier">step_name</span> = <span class="ruby-identifier">step</span>.<span class="ruby-identifier">name</span>
64:           <span class="ruby-identifier">step_names</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">step_name</span>
65:           
66:           <span class="ruby-comment cmt"># It's important to have access to the parsed args here, so</span>
67:           <span class="ruby-comment cmt"># we can give them to the listeners. The HTML reporter needs</span>
68:           <span class="ruby-comment cmt"># the args so it can style them. See the generated output in</span>
69:           <span class="ruby-comment cmt"># story_server/prototype/rspec_stories.html (generated by rake stories)</span>
70:           <span class="ruby-identifier">args</span> = <span class="ruby-identifier">step</span>.<span class="ruby-identifier">parse_args</span>(<span class="ruby-identifier">name</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>.<span class="ruby-identifier">empty?</span>
71:           <span class="ruby-keyword kw">begin</span>
72:             <span class="ruby-identifier">listeners</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">step_upcoming</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">step_name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) }
73:             <span class="ruby-identifier">step</span>.<span class="ruby-identifier">perform</span>(<span class="ruby-identifier">world</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">dry_run</span>
74:             <span class="ruby-identifier">listeners</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">step_succeeded</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">step_name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) }
75:           <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
76:             <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">e</span>
77:             <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Spec</span><span class="ruby-operator">::</span><span class="ruby-constant">Example</span><span class="ruby-operator">::</span><span class="ruby-constant">ExamplePendingError</span>
78:               <span class="ruby-ivar">@listeners</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">step_pending</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">step_name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) }
79:             <span class="ruby-keyword kw">else</span>
80:               <span class="ruby-ivar">@listeners</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">l</span><span class="ruby-operator">|</span> <span class="ruby-identifier">l</span>.<span class="ruby-identifier">step_failed</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">step_name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) }
81:             <span class="ruby-keyword kw">end</span>
82:             <span class="ruby-identifier">errors</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">e</span>
83:           <span class="ruby-keyword kw">end</span>
84:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000115" class="method-detail">
        <a name="M000115"></a>

        <div class="method-heading">
          <a href="#M000115" class="method-signature">
          <span class="method-name">use</span><span class="method-args">(steps)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000115-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000115-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/world.rb, line 38</span>
38:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">use</span>(<span class="ruby-identifier">steps</span>)
39:           <span class="ruby-identifier">step_mother</span>.<span class="ruby-identifier">use</span>(<span class="ruby-identifier">steps</span>)
40:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000127" class="method-detail">
        <a name="M000127"></a>

        <div class="method-heading">
          <a href="#M000127" class="method-signature">
          <span class="method-name">And</span><span class="method-args">(name, *args, &amp;block)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000127-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000127-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/world.rb, line 123</span>
123:       <span class="ruby-keyword kw">def</span> <span class="ruby-constant">And</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
124:         <span class="ruby-constant">World</span>.<span class="ruby-identifier">store_and_call</span> <span class="ruby-keyword kw">self</span>, <span class="ruby-ivar">@__previous_step</span>, <span class="ruby-identifier">name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>
125:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000124" class="method-detail">
        <a name="M000124"></a>

        <div class="method-heading">
          <a href="#M000124" class="method-signature">
          <span class="method-name">Given</span><span class="method-args">(name, *args, &amp;block)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000124-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000124-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/world.rb, line 108</span>
108:       <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Given</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
109:         <span class="ruby-constant">World</span>.<span class="ruby-identifier">store_and_call</span> <span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">:given</span>, <span class="ruby-identifier">name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>
110:         <span class="ruby-ivar">@__previous_step</span> = <span class="ruby-identifier">:given</span>
111:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000123" class="method-detail">
        <a name="M000123"></a>

        <div class="method-heading">
          <a href="#M000123" class="method-signature">
          <span class="method-name">GivenScenario</span><span class="method-args">(name)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000123-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000123-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/world.rb, line 103</span>
103:       <span class="ruby-keyword kw">def</span> <span class="ruby-constant">GivenScenario</span>(<span class="ruby-identifier">name</span>)
104:         <span class="ruby-constant">World</span>.<span class="ruby-identifier">run_given_scenario_with_suspended_listeners</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-value str">'given scenario'</span><span class="ruby-value str">'given scenario'</span>, <span class="ruby-identifier">name</span>, <span class="ruby-constant">GivenScenario</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>))
105:         <span class="ruby-ivar">@__previous_step</span> = <span class="ruby-identifier">:given</span>
106:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000126" class="method-detail">
        <a name="M000126"></a>

        <div class="method-heading">
          <a href="#M000126" class="method-signature">
          <span class="method-name">Then</span><span class="method-args">(name, *args, &amp;block)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000126-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000126-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/world.rb, line 118</span>
118:       <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Then</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
119:         <span class="ruby-constant">World</span>.<span class="ruby-identifier">store_and_call</span> <span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">:then</span>, <span class="ruby-identifier">name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>
120:         <span class="ruby-ivar">@__previous_step</span> = <span class="ruby-identifier">:then</span>
121:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000125" class="method-detail">
        <a name="M000125"></a>

        <div class="method-heading">
          <a href="#M000125" class="method-signature">
          <span class="method-name">When</span><span class="method-args">(name, *args, &amp;block)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000125-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000125-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/world.rb, line 113</span>
113:       <span class="ruby-keyword kw">def</span> <span class="ruby-constant">When</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
114:         <span class="ruby-constant">World</span>.<span class="ruby-identifier">store_and_call</span> <span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">:when</span>, <span class="ruby-identifier">name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>
115:         <span class="ruby-ivar">@__previous_step</span> = <span class="ruby-identifier">:when</span>
116:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000122" class="method-detail">
        <a name="M000122"></a>

        <div class="method-heading">
          <a href="#M000122" class="method-signature">
          <span class="method-name">errors</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000122-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000122-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/world.rb, line 99</span>
 99:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">errors</span>
100:         <span class="ruby-constant">World</span>.<span class="ruby-identifier">errors</span>
101:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000121" class="method-detail">
        <a name="M000121"></a>

        <div class="method-heading">
          <a href="#M000121" class="method-signature">
          <span class="method-name">start_collecting_errors</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000121-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000121-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/story/world.rb, line 95</span>
95:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">start_collecting_errors</span>
96:         <span class="ruby-identifier">errors</span>.<span class="ruby-identifier">clear</span>
97:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>